import axios from 'axios'
import { Message } from 'element-ui'

/**
 * 获取组织架构列表
 */
export const getDepartmentList = () => {
  try {
    const response = axios.get('http://localhost:3000/department')
    return response
  } catch (error) {
    Message({ type: 'error', message: '获取组织架构列表失败' })
    return Promise.reject(error)
  }
}
